/**
 * 
 */
package com.et.easy.demo.spring;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.et.mvc.FreeMarkerView;
import com.et.mvc.View;

/**
 * 
 * @author defier Lai
 * Date: 2009-12-9 下午11:50:46
 * @version 1.0
 */

@Controller("webController")@Scope("prototype") // 每次都要实例化
public class WebController {
	
	//@Resource默认是按照名称装配，找不到与名称匹配的bean时按类型装配
	@Resource(name="userService")
	private UserService userService;
	
	public View list() {
		userService.findUserInfo(100000);
		System.out.println("render list view.");
		return new FreeMarkerView();
	}

}
